package com.originskyseed.platform.log.model;

import java.util.Date;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.originskyseed.platform.core.mongodb.bean.BaseMongo;

/**
 * （OSI_INTERFACE_SYNCHRO_LOG）
 * 
 * @author ling
 */
public class InterfaceSynchroLog extends BaseMongo {

	/**
	 * 状态 1成功 2失败
	 */
	private Integer state;

	/**
	 * 调用开始时间
	 */
	private Date startTime;

	/**
	 * 调用结束时间
	 */
	private Date endTime;

	/**
	 * 错误日志
	 */
	private String errorLog;

	/**
	 * 接口用途
	 */
	private String desc;

	/**
	 * 接口名称
	 */
	private String name;

	/**
	 * 类型 1青芒调用平台 2平台调用青芒
	 */
	private Integer type;

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public String getErrorLog() {
		return errorLog;
	}

	public void setErrorLog(String errorLog) {
		this.errorLog = errorLog;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Map<String, Object> toMap() {
		return (Map) JSONObject.parseObject(JSONObject.toJSONString(this, new SerializerFeature[] { SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteMapNullValue }), Map.class);
	}
}